added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CSSL3DataBinding / GeneralProblems.xaml
blob0d22181a8e4ecf6c17da8a784cc144eeba481e84
1 <!--/****************************** Module Header ******************************\
2 * Module Name:  GeneralProblems.xaml
3 * Project:      CSSL3DataBinding
4 * Copyright (c) Microsoft Corporation.
5
6 * This module contains documentation of general problems developers may meet with
7 * when using DataBinding in SL3. There's no sample code regarding DataBinding in
8 * this module.
9
10 * This source is subject to the Microsoft Public License.
11 * See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
12 * All other rights reserved.
13
14 * History:
15 * * 11/26/2009 06:00 PM Allen Chen Created
16 \***************************************************************************/-->
17     
18     <UserControl x:Class="CSSL3DataBinding.GeneralProblems"
19     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
20     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
21     xmlns:local="clr-namespace:CSSL3DataBinding"
22     Width="1400" Height="1300">
23     <Grid x:Name="LayoutRoot" Background="White">
24         <StackPanel >
25             <TextBlock FontSize="24" Text="What Cannot be Bound:"></TextBlock>
26             <TextBlock Foreground="Red"><Run Text="To support data binding, the target class must inherit from FrameworkElement or CollectionViewSource."/><LineBreak/><Run Text="A general problem is mistakenly use Binding in XMAL."/><Run Text=" "/><LineBreak/><Run Text="For instance, we cannot bind Run objects in XAML."/><LineBreak/><Run Text="In SL3, the following code will cause XAML parse exception:"/><LineBreak/><Run Foreground="Black" Text=" &lt;TextBlock&gt;"/><LineBreak/><Run Foreground="Black" Text=" &lt;Run Text=&quot;{Binding Name}&quot;&gt;&lt;/Run&gt; "/><LineBreak/><Run Foreground="Black" Text=" &lt;/TextBlock&gt;"/><LineBreak/><Run Foreground="#FFFC0606" Text="In addition, the binding target property must be DependencyProperty. For more details please refer to the"/><LineBreak/><Run Foreground="#FFFC0606" Text="following MSDN documentation:"/><LineBreak/><Run Foreground="#FFFC0606" Text=""/></TextBlock>
27             <HyperlinkButton NavigateUri="http://msdn.microsoft.com/en-us/library/cc221408(VS.95).aspx" Content="http://msdn.microsoft.com/en-us/library/cc221408(VS.95).aspx" Foreground="#FF0088FF"></HyperlinkButton>
28         </StackPanel>   
29     </Grid>
30 </UserControl>